package com.haorui.lygyd.autotas.task;

import com.haorui.autotask.task.ScheduleBaseTask;
import com.haorui.lygyd.payordermanager.service.OrderRevokeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 自动更新未支付订单
 * Created by Administrator on 2018/3/12.
 */
@Service
@Slf4j
public class TaskOrderRevoke implements ScheduleBaseTask {
    @Autowired
    private OrderRevokeService orderRevokeService;
    @Override
    public void runTask() throws Exception {
        log.debug("执行自动取消订单任务");
        int count=orderRevokeService.getOrderRevokeEntityListByOverdueDate();
        log.debug("自动取消订单任务执行完毕,共取消"+count+"个订单");
    }

}
